<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Example
 *
 * This is an example of a few basic user interaction methods you could use
 * all done with a hardcoded array.
 *
 * @package		CodeIgniter
 * @subpackage	Rest Server
 * @category	Controller
 * @author		Phil Sturgeon
 * @link		http://philsturgeon.co.uk/code/
*/

// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH.'/libraries/REST_Controller.php';

class markettype extends REST_Controller
{
    function getbyid_get()
    {
    	if(!$this->get('id'))
    	{
    		$this->response(NULL, 400);
    	}
    	$this->load->model('markettypedao');
    	$role = $this->markettypedao->insert($this->get('id'));
    	$this->response($role, 200);
    	
    }
    function getall_get()
    {

    	$this->load->model('markettypedao');
    	$role = $this->markettypedao->get_all();
    	$this->response($role, 200);
    	 
    }
}